<html>
<!--
 Copyright (C) 2009, 2011 XStream committers.
 All rights reserved.
 
 The software in this package is published under the terms of the BSD
 style license a copy of which has been included with this distribution in
 the LICENSE.txt file.
 
 Created on 03. May 2009 by Joerg Schaible
 -->
  <head>
    <title>Parser Benchmarks</title>
        <style type="text/css">
            #content td { text-align: right;}
            #content dt { font-weight: bold;}
        </style>
  </head>

  <body>
    <p>Benchmark results are always dependent on a very individual setup. Normally it is not useful to generalize such results
    for every use case, but it can give you a hint. However, if you're really in the need of maximum performance, you should
    probably create an own benchmark with your objects or even use a profiler to detect the real hot spots in your application.</p>

    <h2 id="values">Benchmark Values</h2>
	
    <table summary="Benchmark for all XML parsers supported by XStream using different converter types">
      <tr>
        <th>Parser</th>
        <th>Single Value Converters</th>
        <th>Standard Converters</th>
        <th>Reflection Converter</th>
        <th>Serializable Converter</th>
      </tr>
      <tr>
        <th>W3C DOM</th>
        <td>1823.0</td>
        <td>1495.0</td>
        <td>1437.0</td>
        <td>1758.0</td>
      </tr>
      <tr>
        <th>JDOM</th>
        <td>2620.0</td>
        <td>1796.0</td>
        <td>1776.0</td>
        <td>2030.0</td>
      </tr>
      <tr>
        <th>DOM4J</th>
        <td>1824.0</td>
        <td>1811.0</td>
        <td>2636.0</td>
        <td>2177.0</td>
      </tr>
      <tr>
        <th>XOM</th>
        <td>571.0</td>
        <td>716.0</td>
        <td>995.0</td>
        <td>958.0</td>
      </tr>
      <tr>
        <th>StAX (BEA)</th>
        <td>430.0</td>
        <td>359.0</td>
        <td>531.0</td>
        <td>737.0</td>
      </tr>
      <tr>
        <th>StAX (Woodstox)</th>
        <td>357.0</td>
        <td>344.0</td>
        <td>535.0</td>
        <td>725.0</td>
      </tr>
      <tr>
        <th>StAX (SJSXP)</th>
        <td>332.0</td>
        <td>445.0</td>
        <td>491.0</td>
        <td>667.0</td>
      </tr>
      <tr>
        <th>XPP (Xpp3)</th>
        <td>351.0</td>
        <td>395.0</td>
        <td>544.0</td>
        <td>743.0</td>
      </tr>
      <tr>
        <th>XPP (kXML2)</th>
        <td>299.0</td>
        <td>353.0</td>
        <td>517.0</td>
        <td>761.0</td>
      </tr>
      <tr>
        <th>XppDom (Xpp3)</th>
        <td>351.0</td>
        <td>395.0</td>
        <td>544.0</td>
        <td>743.0</td>
      </tr>
      <tr>
        <th>XppDom (kXML2)</th>
        <td>299.0</td>
        <td>353.0</td>
        <td>517.0</td>
        <td>761.0</td>
      </tr>
    </table>
  
    <h2 id="setup">Setup</h2>
  
    <p>The values have been generated running the ParserBenchmark harness of the XStream benchmark module's test code.</p>
    
    <dl>
      <dt>Single Value Converters</dt>
      <dd>A list with a set of 10 objects of different types (like String, int, File, Locale, Double, ...) that will
      be all handled by a SingleValueConverter.</dd>
      <dt>Standard Converters</dt>
      <dd>A list with a set of 6 objects of different types (like Properties, Color, Class, Method, ...) that will
      be all handled by a specialized converter processing nested XML elements.</dd>
      <dt>Reflection Converter</dt>
      <dd>A list with a set of 6 objects of different types (One, Five of the XStream benchmark package) that will be
      all handled by the ReflectionConverter.</dd>
      <dt>Serializable Converter</dt>
      <dd>A list with a set of 6 objects of different types (SerializableOne, SerializableFive of the XStream
      benchmark package) that will be all handled by the SerializableConverter.</dd>
      <dt>JavaBean Converter</dt>
      <dd>A list with a set of 6 objects of different types (OneBean, FiveBean of the XStream benchmark package) that
      will be all handled by the JavaBeanConverter. This converter has been registered especially for this two types.</dd>
    </dl>
  
    <h2 id="environment">Environment</h2>
    
    <p>The values above's unit is ms measured after 1000 unmarshalling operations with the object graphs described in
    the setup using XStream 1.4. The benchmark was run on an AMD Athlon with 2.1GHz running a JVM of Sun JDK 1.6.0_13
    (32-bit) in Gentoo Linux. Note again, that these values are no replacement for real profiler results and they may
    vary from run to run for ~100ms due to this machine's background processes on a single CPU. However, it can give
    you some idea of what you can expect using different parser technologies.</p>
  </body>
</html>
  